package com.zenithmind.library.pojo.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;

/**
 * 图书分类创建DTO
 * 
 * @author ZenithMind
 * @since 2024-06-14
 */
@Data
@Schema(name = "图书分类创建DTO", description = "创建图书分类时的数据传输对象")
public class CategoryCreateDTO {

    @NotBlank(message = "分类名称不能为空")
    @Size(max = 100, message = "分类名称长度不能超过100个字符")
    @Schema(description = "分类名称", example = "计算机科学")
    private String name;

    @NotBlank(message = "分类编码不能为空")
    @Size(max = 50, message = "分类编码长度不能超过50个字符")
    @Schema(description = "分类编码", example = "CS")
    private String code;

    @Schema(description = "父分类ID", example = "1")
    private String parentId;

    @Size(max = 500, message = "分类描述长度不能超过500个字符")
    @Schema(description = "分类描述", example = "计算机科学相关图书")
    private String description;

    @Schema(description = "排序号", example = "1")
    private Integer sortOrder;

    @Schema(description = "分类图标", example = "icon-computer")
    private String icon;

    @Schema(description = "分类颜色", example = "#409EFF")
    private String color;
}
